from celery import Celery
from django.core.mail import send_mail

import os
import django

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fruitshop.settings")
django.setup()

app = Celery('celery_task.tasks', broker='redis://127.0.0.1:6379/6')

@app.task
def send_Email(subject, message, from_email, recipient_list, **kwargs):
    print("11111111111")
    send_mail(subject, message,from_email, recipient_list, **kwargs)
    print("22222222222")
